import os


def traversal(url):
    files = os.listdir(url)
    for f in files:
        p = os.path.join(url, f)
        if os.path.isfile(p):
            print(p)
        if os.path.isdir(p):
            traversal(p)


traversal('F:/django_code')





